<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <style>
        #bj{
            padding-right: 230px;
            padding-left: 230px;
        }
    </style>
</head>

<body>
<div id="app">
<div id="bj">
    <template >
        <el-descriptions class="margin-top" title="就诊结果表" :column="3" :size="size">
            <el-descriptions-item label="身份证账号">{{obj.identity}}</el-descriptions-item>
            <el-descriptions-item label="姓名">{{obj.name}}</el-descriptions-item>
            <el-descriptions-item label="性别">{{obj.gender}}</el-descriptions-item>
            <el-descriptions-item label="年龄">{{obj.age}}</el-descriptions-item>
            <el-descriptions-item label="电话">{{obj.telephone}}</el-descriptions-item>
        </el-descriptions>
        <div><h4>患者病情:</h4></div>
        <el-input
                type="textarea"
                :rows="2"
                placeholder="请输入患者病情"
                v-model="obj.pathogeny"
        >
        </el-input>
        <br>
        <br>
        <div><h4>医生建议:</h4></div>
        <el-input
                type="textarea"
                :rows="2"
                placeholder="请输入医生建议"
                v-model="obj.suggest">
        </el-input>
        <br>
        <br>
        <h4>医生:<el-input v-model="obj.aname" placeholder="请输入内容" style="width: 150px"></el-input></h4>

            <br>
           <br>
        <div style="text-align:center"><el-button type="success" plain @click="update()"style="width:250px">提 交</el-button></div>
    </template>
    <br/>
</div>
</div>
<script>

    var haha=new Vue({
        el:"#app",
        data:{
            obj:{},
            size: '',
            textarea: '',
            text: '',
        },
        methods:{
            update:function () {
                haha.obj.state=1;
                $.post("/ssm/case/update",haha.obj,function (backData) {
                    if(backData.code == 2){
                        haha.$message.error('修改失败 请确认数据 或者联系管理员');

                        // getData(1,10);
                    }else if (backData.code == 1) {
                        window.location.href="/ssm/appointment/subscribe.html"
                    }
                })
            }
        }
    });

    var identity=window.location.href.split("=")[1];
    $.get("/ssm/case/query?identity="+identity,function (backData) {
        haha.obj=backData.data;



    });
</script>
</body>
</html>